<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>培训通知</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/metro-blue/easyui.css">
</head>
<body>
<style type="text/css">
	*{
		margin:0px;
		padding:0px;
	}
	.background{
		width:1100px;
		height: 563px;
		margin: 0px auto;
	    margin-top: 17px;
	    background-color: #FFF;
	}
	.notice-head{
		width: 1100px;
	    height: 45px;
	    border-bottom: 1px solid #F3F3F9;
	    color: #19AA9A;
	    font-size: 18px;
	    text-align: center;
	    line-height: 45px;
	    font-weight: 700;
	}
	.table{
		width: 1020px;
		margin:0px auto;
		margin-top:20px;
		border: 1px solid #E5E5E5;		
	}
	.datagrid-header .datagrid-cell span{
		color: #19AA9A;
	    font-size: 14px;
	    font-weight: 700;
	}
	.datagrid-header .datagrid-cell,.datagrid-cell, .datagrid-cell-group, .datagrid-header-rownumber, .datagrid-cell-rownumber {
		text-align: center;
	}
	.biao_button{
		background:#17AA8D;
		border-radius:3px;
		color:white;
		margin:0 4px;
		width:60px;
		height:25px;
		border:none;
		outline: none;
		cursor:pointer;
	}
	.table .datagrid .panel-body{
	 	width: 1017px;
	}
	.datagrid-header{
		height:39px;
	}
	.datagrid-header-row, .datagrid-row {
   	 	height: 40px;
	}
</style>
<script type="text/javascript">
	$(function(){
		$(".train-course").datagrid({
		    url:'noticefind',
		    singleSelect:true,
		    columns:[[
				{field:'xuhaos',title:'序号',width:80},
				{field:'course_name',title:'课程名称',width:160},
				{field:'activity_start_time',title:'培训开始时间',width:210,
					formatter:function formattime(value,row,index){
			    		var date = new Date(value);
				        var year = date.getFullYear().toString();
				        var month = (date.getMonth() + 1);
				        var day = date.getDate().toString();
				        var hour = date.getHours().toString();
				        var minutes = date.getMinutes().toString();
				        var seconds = date.getSeconds().toString();
				        if (month < 10) {
				            month = "0" + month;
				        }
				        if (day < 10) {
				            day = "0" + day;
				        }
				        if (hour < 10) {
				            hour = "0" + hour;
				        }
				        if (minutes < 10) {
				            minutes = "0" + minutes;
				        }
				        if (seconds < 10) {
				            seconds = "0" + seconds;
				        }
				        return year + "-" + month + "-" + day + " " + hour + ":" + minutes + ":" + seconds;
				}},
				{field:'activity_end_time',title:'培训结束时间',width:210,
					formatter:function formattime(value,row,index){
			    		var date = new Date(value);
				        var year = date.getFullYear().toString();
				        var month = (date.getMonth() + 1);
				        var day = date.getDate().toString();
				        var hour = date.getHours().toString();
				        var minutes = date.getMinutes().toString();
				        var seconds = date.getSeconds().toString();
				        if (month < 10) {
				            month = "0" + month;
				        }
				        if (day < 10) {
				            day = "0" + day;
				        }
				        if (hour < 10) {
				            hour = "0" + hour;
				        }
				        if (minutes < 10) {
				            minutes = "0" + minutes;
				        }
				        if (seconds < 10) {
				            seconds = "0" + seconds;
				        }
				        return year + "-" + month + "-" + day + " " + hour + ":" + minutes + ":" + seconds;
				}},
				{field:'Staff_name',title:'培训讲师',width:158},
				{field:'caozuo',title:'操作',width:200,
					formatter:function formattime(value,row,index){			    		
						return "<input class='biao_button' type='button' value='查看' onClick='chakan("+row.activity_id+")'/>";
					}}
				]],
		          pagination:true,
				    pageNumber:1,
				    pageSize:5,
				    pageList:[5,10,15]
		});
	})
	function add(text){
		$("#content-admin").panel({
			href:text
		});
	}
	function chakan(a){
		add("train-tz-chakan?activity_id="+a);
	}
</script>
	<div class="background">
		<div class="notice-head">培训通知</div>
		<div class="table">
			<table class="easyui-datagrid train-course" style="width:1017px;height:400px"></table>
		</div>
	</div>
</body>
</html>